package com.todo.strategy.common.constant;


import com.todo.strategy.common.enums.PlanRelationSceneEnum;

/**
 * @author azhebuxing
 * @date 2024/12/6 00:52
 * @description
 */
public class StrategyOfflineKeyBuild {

    public static String strategyPlatformDetailKey(Long strategyId) {
        return String.format(StrategyOfflineRedisKey.STRATEGY_PLATFORM_DETAIL_INFO_KEY, strategyId);
    }

    public static String strategyPlatformExtendKey(Long strategyId) {
        return String.format(StrategyOfflineRedisKey.STRATEGY_DETAIL_EXTEND_KEY, strategyId);
    }


    public static String planRelationListKey(PlanRelationSceneEnum businessScene, Long businessId) {
        return String.format(StrategyOfflineRedisKey.STRATEGY_PLAN_RELATION_LIST_KEY, businessScene, businessId);
    }

    public static String planSetDetailKey(Long planId) {
        return String.format(StrategyOfflineRedisKey.STRATEGY_PLAN_SET_DETAIL_KEY, planId);
    }

    public static String memoTemplateKey(Long memoTemplateId) {
        return String.format(StrategyOfflineRedisKey.MEMO_TEMPLATE_KEY, memoTemplateId);
    }


    public static String PStrategyCounterIdempotentKey(String messageId) {
        return String.format(StrategyOfflineRedisKey.P_STRATEGY_COUNTER_IDEMPOTENT_KEY, messageId);
    }

    /**
     * 平台攻略新增标识
     * @param strategyId
     * @return
     */
    public static String pStrategyInsertTagKey(Long strategyId) {
        return String.format(StrategyOfflineRedisKey.P_STRATEGY_INSERT_TAG_KEY, strategyId);
    }
}
